package top.aiprogram.login.service;

import top.aiprogram.login.Teacher;
import top.aiprogram.login.dao.TeacherDao;

public class LoginService {

    public Teacher checkLogin(String username, String password){

        try {
            TeacherDao teacherDao = new TeacherDao();
            Teacher teacher = teacherDao.queryTeacher(username,password);
            if(teacher!=null){
                return teacher;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
